using System;
using System.Collections.Generic;
using System.Text;

namespace Sedodream.Sudoku.Evaluators
{
	public class Score : IScore
	{
		#region Fields
		public ScoreType scoreType;
		private double majorScore;
		private double minorScore;
		#endregion

		#region Constructors
		public Score(ScoreType scoreType)
		{
			this.scoreType = scoreType;
		}
		public Score(ScoreType scoreType, double majorScore)
			: this(scoreType)
		{
			this.majorScore = majorScore;
		}
		public Score(ScoreType scoreType, double majorScore, double minorScore)
			: this(scoreType, majorScore)
		{
			this.minorScore = minorScore;
		}
		#endregion

		public override string ToString()
		{
			return string.Format("{0}.{1}", MajorScore, MinorScore);
		}

		#region IScore Members

		public ScoreType ScoreType
		{
			get { return this.scoreType; }
		}

		public double MajorScore
		{
			get { return this.majorScore; }
			set { this.majorScore = value; }
		}

		public double MinorScore
		{
			get { return this.minorScore; }
			set { this.minorScore = value; }
		}

		#endregion
	}
}
